#include "BgObj.h"
#include "PublicMarcos.h"
#include "GameRoom.h"
#include "Environment.h"

BgObj::BgObj( hgeSprite *Sprite,float _x,float _y,bool scroll ) : m_sprite(Sprite),m_x(_x),m_y(_y),m_isScroll(scroll)
{

}

BgObj::~BgObj()
{

}

void BgObj::Update()
{
	if (m_isScroll) {
		m_y+=2;
		if (m_y==766)
			m_y = 0;
	}
}
void BgObj::Render()
{
	m_sprite->Render(m_x,m_y);
}

hgeRect* BgObj::getCollision(hgeRect* rect)
{
	return NULL;
}